package com.atguigu.spring6.aop.xmlaop;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 通过配置文件实现AOP
 */
public class TestAop {

    @Test
    public void testAop() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beanaop.xml");
        Calulator bean = applicationContext.getBean(Calulator.class);
//        bean.add(1, 2);
        bean.div(1, 0);
    }
}
